#ifndef SUMPPM_H
#define SUMPPM_H


#define CH_ORDER_IN_ADR  0
#define CH_ORDER_OUT_ADR 8
#define MAX_OUT_CH       8
#define MAX_IN_CH        8

#define SEQU_DELAY 0
#define CH_DELAY   1
#define PIN_HI     2

#define IN_SEQU_DELAY  0
#define IN_CH_DELAY    1
#define IN_PIN_HI      2

#define BUFFER_IN_SIZE 4



#define OUTPUT_DDR_1  DDRB
#define OUTPUT_DDR_2  DDRB
#define OUTPUT_DDR_3  DDRB
#define OUTPUT_DDR_4  DDRD
#define OUTPUT_DDR_5  DDRD
#define OUTPUT_DDR_6  DDRD
#define OUTPUT_DDR_7  DDRB
#define OUTPUT_DDR_8  DDRB


#define OUTPUT_PORT_1 PORTB
#define OUTPUT_PORT_2 PORTB
#define OUTPUT_PORT_3 PORTB


#define OUTPUT_PORT_4 PORTD
#define OUTPUT_PORT_5 PORTD
#define OUTPUT_PORT_6 PORTD
/*
#define OUTPUT_PORT_4 PORTB
#define OUTPUT_PORT_5 PORTB
#define OUTPUT_PORT_6 PORTB
*/
#define OUTPUT_PORT_7 PORTB
#define OUTPUT_PORT_8 PORTB

#define OUTPUT_BIT_1  PB2
#define OUTPUT_BIT_2  PB1
#define OUTPUT_BIT_3  PB0
#define OUTPUT_BIT_4  PD7
#define OUTPUT_BIT_5  PD6
#define OUTPUT_BIT_6  PD5
#define OUTPUT_BIT_7  PB7
#define OUTPUT_BIT_8  PB6

/*
#define OUTPUT_BIT_1  PB2
#define OUTPUT_BIT_2  PB2
#define OUTPUT_BIT_3  PB2
#define OUTPUT_BIT_4  PB2
#define OUTPUT_BIT_5  PB2
#define OUTPUT_BIT_6  PB2
#define OUTPUT_BIT_7  PB2
#define OUTPUT_BIT_8  PB2
*/

#define INPUT_BIT_1   PC2
#define INPUT_BIT_2   PC3
#define INPUT_BIT_3   PC4
#define INPUT_BIT_4   PC5
#define INPUT_BIT_5   PD0
#define INPUT_BIT_6   PD1
#define INPUT_BIT_7   PD2
#define INPUT_BIT_8   PD3

#define INPUT_PIN_1   PINC
#define INPUT_PIN_2   PINC
#define INPUT_PIN_3   PINC
#define INPUT_PIN_4   PINC
#define INPUT_PIN_5   PIND
#define INPUT_PIN_6   PIND
#define INPUT_PIN_7   PIND
#define INPUT_PIN_8   PIND

#define INPUT_PORT_1   PORTC
#define INPUT_PORT_2   PORTC
#define INPUT_PORT_3   PORTC
#define INPUT_PORT_4   PORTC
#define INPUT_PORT_5   PORTD
#define INPUT_PORT_6   PORTD
#define INPUT_PORT_7   PORTD
#define INPUT_PORT_8   PORTD


#define TEST_DDR      DDRB
#define TEST_PORT     PORTB
#define TEST_BIT      PB1

#define gyroCh 7


#define MAX_PULSE_TIME 3000


void ReadInBuffer(void);

void GyroOut(void);








#endif // SUMPPM_H
